<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8" />
    <title>祈贝健康--后台管理系统</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />

    <!-- ================== BEGIN BASE CSS STYLE ================== -->
    <link href="./Public/Admin/assets/plugins/jquery-ui/themes/base/minified/jquery-ui.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/animate.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/style.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/style-responsive.min.css" rel="stylesheet" />
    <link href="./Public/Admin/assets/css/theme/default.css" rel="stylesheet" id="theme" />
    <!-- ================== END BASE CSS STYLE ================== -->

    <!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
    <link href="./Public/Admin/assets/plugins/DataTables/css/data-table.css" rel="stylesheet" />
    <!-- ================== END PAGE LEVEL STYLE ================== -->

    <!-- ================== BEGIN BASE JS ================== -->
    <script src="./Public/Admin/assets/plugins/pace/pace.min.js"></script>
    <!-- ================== END BASE JS ================== -->
</head>
<body>
<php> include './Public/Admin/header.html'; </php>



<!-- begin #content -->
<div id="content" class="content">
    <!-- begin breadcrumb -->
    <ol class="breadcrumb pull-right">
        <li><a href="javascript:;">首页</a></li>
        <li><a href="javascript:;">医生管理</a></li>
        <li class="active">修改医生信息</li>

    </ol>
    <!-- end breadcrumb -->
    <!-- begin page-header -->
    <h1 class="page-header">医生管理 <small>修改医生信息</small></h1>
    <!-- end page-header -->

    <!-- begin row -->
    <div class="row">
        <!-- begin col-12 -->
        <div class="col-md-12">
            <!-- begin panel -->
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
                    </div>
                    <h4 class="panel-title">修改医生信息</h4>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">


                        <!--表单-->

                        <div class='col-md-10'>
                            <form class='form-horizontal' role='form'  method="post" action="index.php?m=Admin&c=Doctor&a=lists&type=2" enctype="multipart/form-data">
                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>姓名：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="name" id='name' placeholder='请输入姓名' value="">
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>会员名称：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="logname" id='logname' placeholder='请输入姓名' value="">
                                    </div>
                                </div>
                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>所属国家：</label>
                                    <div class='col-md-4'>
                                        <select onchange="loadCity()" class='form-control' name="countryid" id="countryid">


                                        </select>
                                    </div>
                                </div>
                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>所属城市：</label>
                                    <div class='col-md-4'>
                                        <select onchange="loadHospital()" class='form-control' name="cityId" id="cityId">


                                        </select>
                                    </div>
                                </div>
                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>所属医院：</label>
                                    <div class='col-md-4'>
                                        <select class='form-control' name="hospital_id" id="hospitalId">


                                        </select>
                                    </div>
                                </div>
                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>中文职称：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="title_cn" id='title_cn' placeholder='请输入中文职称' value="">
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>英文职称：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="title_en" id='title_en' placeholder='请输入英文职称' value="">
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>中文专长：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="speciality_cn" id='speciality_cn' placeholder='请输入中文专长' value="">
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>英文专长：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="speciality_en" id='speciality_en' placeholder='请输入英文专长' value="">
                                    </div>
                                </div>




                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>科室：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="dept" id='dept' placeholder='请输入科室'>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>中文介绍：</label>
                                    <div class='col-md-4'>
                                        <textarea class="form-control" rows='3' name="abstract" id="abstract"  placeholder="请输入中文介绍"></textarea>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>英文介绍：</label>
                                    <div class='col-md-4'>
                                        <textarea class="form-control" rows='3' name="descrip" id="descrip"  placeholder="请输入英文介绍"></textarea>
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>医生照片：</label>
                                    <div class='col-md-4'>
                                        <input type="file" name="img" id="img"/>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>电话：</label>
                                    <div class='col-md-4'>
                                        <input type='text' class='form-control input-lg' name="telephone" id='telephone' placeholder='请输入电话' value="">
                                    </div>
                                </div>


                                <div class='form-group'>
                                    <label for='inputtext' class='col-md-2 control-label'>ceshi</label>
                                    <div class='col-md-4'>
                                        <label class="checkbox-inline">
                                            <input type="checkbox" id="#Deputy Clinical Director" name="iceshi" value="H E F">Infertility
                                        </label>
                                    </div>
                                </div>

                                <div class='form-group'>
                                    <div class='col-md-3 col-md-offset-2'>
                                        <button  class='btn btn-success btn-radius'>提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>


                    </div>
                </div>
            </div>
            <!-- end panel -->
        </div>
        <!-- end col-12 -->
    </div>
    <!-- end row -->
</div>
<!-- end #content -->


<!-- begin scroll to top btn -->
<a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade" data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
<!-- end scroll to top btn -->
<?php include './header.html'; ?>
<!-- end page container -->

<!-- ================== BEGIN BASE JS ================== -->
<script src="./Public/Admin/assets/plugins/jquery/jquery-1.9.1.min.js"></script>
<script src="./Public/Admin/assets/plugins/jquery/jquery-migrate-1.1.0.min.js"></script>
<script src="./Public/Admin/assets/plugins/jquery-ui/ui/minified/jquery-ui.min.js"></script>
<script src="./Public/Admin/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="./Public/Admin/assets/crossbrowserjs/html5shiv.js"></script>
<script src="./Public/Admin/assets/crossbrowserjs/respond.min.js"></script>
<script src="./Public/Admin/assets/crossbrowserjs/excanvas.min.js"></script>
<![endif]-->
<script src="./Public/Admin/assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!-- ================== END BASE JS ================== -->

<!-- ================== BEGIN PAGE LEVEL JS ================== -->
<script src="./Public/Admin/assets/plugins/DataTables/js/jquery.dataTables.js"></script>
<script src="./Public/Admin/assets/plugins/DataTables/js/dataTables.colVis.js"></script>
<script src="./Public/Admin/assets/js/apps.min.js"></script>
<!-- ================== END PAGE LEVEL JS ================== -->
<script>
    $(document).ready(function() {
        App.init();
        loadc();
    });
    function loadc() {
        var hospital_id;
        $.getJSON("index.php?m=Admin&c=Doctor&a=update_list", function (result) {
            if (result != null) {
                hospital_id = result.hospital_id;
                $("#logname").val(result.logname);
                $('#name').val(result.name);
                $('#title_cn').val(result.title_cn);
                $('#title_en').val(result.title_en);
                $('#speciality_cn').val(result.speciality_cn);
                $('#speciality_en').val(result.speciality_en);
                $('#dept').val(result.dept);
                $('#abstract').val(result.abstract);
                $('#descrip').val(result.descrip);
                $('#address').val(result.img);
                $('#telephone').val(result.telephone);
                var zid;
                $.getJSON("index.php?m=Admin&c=Doctor&a=get_hospital_one&hid="+hospital_id,function(result){
                    var html='';
                    if(result!=null){
                        zid=result.zid;
                        html+='<option value="'+result.id+'">'+result.name+'</option>';
                    }

                    $("#hospitalId").html(html);

                    var getCountry;
                    $.getJSON("index.php?m=Admin&c=Doctor&a=get_city_one&zid="+zid,function(result){
                         var cityHtml=" ";
                        if(result!=null){
                            getCountry=result.cid;
                            cityHtml+= '<option value="' + result.id + '" selected>' + result.name + '</option>';
                         }
                        $("#cityId").html(cityHtml);

                        $.getJSON("index.php?m=Admin&c=Doctor&a=get_country",function(result) {
                            var countryHtml = '<option value="-1">--请选择--</option>';
                            if (result != null) {
                                $.each(result, function (key, val) {
                                    if (getCountry == val.countryid) {
                                        countryHtml += '<option value="' + val.countryid + '" selected>' + val.countryname_cn + '</option>';
                                    } else {
                                        countryHtml += '<option value="' + val.countryid + '">' + val.countryname_cn + '</option>';
                                    }
                                });
                            }
                            $("#countryid").html(countryHtml);
                        });

                    });

                });

            }
        });

    }
    /*=======================获得地区信息==========================*/
    function loadCity(){
        var a=$("#countryid").find("option:selected").val();
        $.getJSON("index.php?m=Admin&c=Hotel&a=get_city_list&cid="+a,function(result){
            var html = '<option value="-1">--请选择--</option>';
            if(result!=null){
                $.each(result,function(key,val){
                    html += '<option value="' + val.id + '">' + val.name + '</option>';
                });
            }
            $("#cityId").html(html);
        });
    }
    function loadHospital(){
        var a= $("#cityId").find("option:selected").val();
        $.getJSON("index.php?m=Admin&c=Hotel&a=get_hospital_list&zid="+a,function(result){
            var html = '<option value="-1">--请选择--</option>';
            if(result!=null){
                $.each(result,function(key,val){
                    html += '<option value="' + val.id + '">' + val.name + '</option>';
                });
            }
            $("#hospitalId").html(html);
        });
    }


</script>


</body>
</html>

